package iscte.ai.kcgtd;

import android.app.DatePickerDialog;
import android.widget.Button;
import android.widget.DatePicker;

public class DateDialogListener implements DatePickerDialog.OnDateSetListener{
	private KCGTDTime time;
	private Button button;
	
	public DateDialogListener(Button b, KCGTDTime time){
		this.time=time;
		this.button = b;
	}
	@Override
	public void onDateSet(DatePicker dp, int y, int m, int d) {
		time.setYear(y);
		time.setMonth(m);
		time.setMonthDay(d);

		button.setText(Utils.DisplayDate(y, m, d));
	}

}
